package com.changgou.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/kf")
public class kafkaController {

    @Autowired
    private KafkaTemplate kafkaTemplate;


    @RequestMapping("/sendMsg")
    public String  sendMsg(){
        kafkaTemplate.send("test03","helloaasdas!");
        return null;
    }
}
